<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">
<style>
.pageHeader.repair li{
    width:300px;float:left;padding: 5px 0px;
}
.pageHeader.repair li a,input,label{
    float:left;
}
.pageHeader.repair li label{
    text-align: left; width:100px;
}

.searchContent.memo li label
{
        display:block;margin-bottom:10px;
}
.searchContent.memo li textarea
{
        width:238px;height:50px
}
                
</style>
<div class="pageContent">
    <form method="post"
    <#if step??&&step==2>
        action="${rc.getContextPath()}/manage/equipmentRepair/saveRecordOrder"
    </#if>
    <#if step??&&step==3>
        action="${rc.getContextPath()}/manage/equipmentRepair/saveCheckOrder"
    </#if>
        
        class="pageForm required-validate"
        onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent" layoutH="46">
            <input type="hidden" name="navTabId" value="${navTabId!''}">
            <input type="hidden" name="id"
                value="<#if (repairOrder.orderCode)??>${repairOrder.orderCode!''}</#if>" />
            <input type="hidden" name="pattern"
                value="${pattern!''}" />
            <fieldset>
                <dl>
                    <dt><@label key='repairOrderCode.C,colon'>报修单号：</@label></dt>
                    <dd style="nowrap"><input type="text" name="orderCode"  size="22" type="text" maxlength="20" value="${repairOrder.orderCode!''}" readonly="readonly" 
                                />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key='repairStatusECode.C,colon'>处理状态：</@label></dt>
                    <dd><input type="text" name="statusECode"  size="22"  maxlength="20"  readonly="readonly"
                            <#if ECode??><#list ECode as eCode>
                                <#if  repairOrder.statusECode==eCode.eCode>
                                    value="${eCode.eCodeText!''}"
                                </#if>
                            </#list></#if>
                                />
                    </dd>
                </dl>
                <dl class="lookupRepairOrder">
                    <dt><@label key="equipmentCode.C,colon">设备编号：</@label></dt>
                    <dd>
                      <input class="required"  readonly="readonly" name="equipmentCode" type="text"  value="${repairOrder.equipmentCode!''}"/>
                    </dd>
                </dl>
                <dl>
                    <dt><@label key='equipmentText.C,colon'>设备描述：</@label></dt>
                    <dd><input  readonly="readonly" size="22" type="text" maxlength="60" name="equipmentText" value="${repairOrder.equipmentText!''}" />
                    </dd>
                </dl>
                <dl  class="lookupRepairOrder">
                    <dt><@label key="failureCode.C,colon">故障代码：</@label></dt>
                    <dd>
                        <input class="required"  readonly="readonly" name="failureCode" type="text"value="${repairOrder.failureCode!''}"/>
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="failureText.C,colon">故障描述：</@label></dt>
                    <dd>
                        <input readonly size="22" type="text" maxlength="60" name="failureText" value="${repairOrder.failureText!''}" />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key='requestUser.C,colon'>报修人：</@label></dt>
                    <dd style="nowrap"><input type="text" name="requestUser"  size="22" type="text" maxlength="20" class="required" readonly="readonly""
                                      value="${repairOrder.requestUser!''}" 
                                />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key='requestDateTime.C,colon'>报修时间：</@label></dt>
                    <dd ><input type="text" id="requestDateTime" name="requestDateTime"   type="text" maxlength="30" "
                                readonly="readonly" value="${(repairOrder.requestDateTime?string('yyyy-MM-dd HH:mm'))?if_exists}"/>
                    </dd>
                </dl>
            </fieldset>

        <div class="tabs" currentIndex="0" eventType="click" >
            <div class="tabsHeader">
                <div class="tabsHeaderContent">
                    <ul>
                        <li><a href="javascript:;"><span><@label key="failureCause.C">故障原因</@label></span></a></li>
                        <li><a href="javascript:;"><span><@label key="partList.C">更换备件记录</@label></span></a></li>
                        <li><a href="javascript:;" ><span><@label key="repairMemo.C">维修内容</@label></span></a></li>
                        <li><a href="javascript:;" ><span><@label key="checkMemo.C">验收记录</@label></span></a></li>
                    </ul>
                </div>
            </div>
            <div class="tabsContent" style="height:260px">
                <div style="width:98%;" id="failureCauseTab">
                        <table id="failureCauseTable"class="table border" width="80%"  >
                            <thead >
                                <tr>
                                    <th><@label key="serialNumber.C">序号</@label></th>
                                    <th><@label key="failureCauseCode.C">故障原因编号</@label></th>
                                    <th><@label key="failureCauseText.C">故障原因描述</@label></th>
                                </tr>
                            </thead>
                            <tbody id="failureCauseBody">
                                <#if repairOrder.causes??> <#if (repairOrder.causes?size>0)> <#list repairOrder.causes as cause>
                                <tr id="failureCause_${cause.failureCauseCode!''}">
                                    <td >${failureCause_index+1}</td>
                                    <td >${cause.failureCauseCode!''}</td>
                                    <td >${cause.failureCauseText!''}</td>
                                </tr>
                                </#list><#else>
                                <tr>
                                    <td colspan="4" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
                                </tr>
                                </#if></#if>
                            </tbody>
                        </table>
                </div>
                <div style="width:98%;" id="partTab">
                        <table id="partTable"class="table border" width="80%" >
                            <thead >
                                <tr>
                                    <th><@label key="serialNumber.C">序号</@label></th>
                                    <th><@label key="partCode.C">备件编号</@label></th>
                                    <th><@label key="partText.C">备件描述</@label></th>
                                    <th><@label key="quantity.C">数量</@label></th>
                                    
                                </tr>
                            </thead>
                            <tbody id="partBody">
                                <#if repairOrder.parts??> <#if (repairOrder.parts?size>0)> <#list repairOrder.parts as part>
                                <tr id="part_${part.partCode!''}">
                                    <td >${part_index+1}</td>
                                    <td >${part.partCode!''}</td>
                                    <td >${part.partText!''}</td>
                                    <td >${part.quantity!''}</td>
                                </tr>
                                </#list><#else>
                                <tr>
                                    <td colspan="4" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
                                </tr>
                                </#if></#if>
                            </tbody>
                        </table>
                </div>
                <div>
                        <dl class="nowrap">
                            <dt><@label key='repairUser.C,colon'>维修人：</@label></dt>
                            <dd ><input type="text" name="repairUser" value="${repairOrder.repairUser!''}" readonly="readonly"class="required"/></dd>
                        </dl>
                        <dl>
                            <dt><@label key='repairStartDateTime.C,colon'>维修开始时间：</@label> </dt>
                            <dd><input type="text" class="required"   readonly="readonly" size="17" max_Date="{repairEndDateTime}"  name="repairStartDateTime" value="${(repairOrder.repairStartDateTime?string('yyyy-MM-dd HH:mm'))?if_exists}" />
                            </dd>
                        </dl>
                        <dl>    
                            <dt><@label key='repairEndDateTime.C,colon'>维修结束时间：</@label> </dt> 
                            <dd><input type="text" class="required"   readonly="readonly" size="17" min_Date="{repairStartDateTime}"  name="repairEndDateTime" value="${(repairOrder.repairEndDateTime?string('yyyy-MM-dd HH:mm'))?if_exists}" />
                            </dd>
                        </dl>
                        <dl>
                            <dt><@label key="repairCategoryCode.C,colon">维修类别编号：</@label></dt>
                            <dd>
                              <input  name="categoryCode" type="text" readonly="readonly" value="${repairOrder.categoryCode!''}" />
                            </dd>
                        </dl>
                        <dl>
                            <dt><@label key='repairCategoryText.C,colon'>维修类别描述：</@label></dt>
                            <dd><input name="categoryText" type="text"  readonly="readonly"value="${repairOrder.categoryText!''}"/>
                            </dd>
                        </dl>
                        <dl style="height: 70px; width: 590px;">
                            <dt><@label key='repairMemo.C,colon'>维修内容：</@label> </dt>
                            <dd><textarea name="repairMemo"  style="height: 70px; width: 435px;" readonly="readonly"maxlength="200"  value="${repairOrder.repairMemo!''}" rows="2" cols="45" class="required"><#if (repairOrder.repairMemo)??>${repairOrder.repairMemo!''}</#if></textarea>
                            </dd>
                        </dl>
                        <dl style="height: 70px; width: 590px;">
                            <dt><@label key='repairResult.C,colon'>维修结果：</@label> </dt> 
                            <dd><textarea name="repairResult"style="height: 70px; width: 435px;" readonly="readonly"maxlength="200"  rows="2" cols="45"value="${repairOrder.repairResult!''}" class="required"><#if (repairOrder.repairResult)??>${repairOrder.repairResult!''}</#if></textarea>
                            </dd>
                        </dl>
                </div>
                <div>
                        <dl class="searchContent">
                            <dt> <@label key='checkUser.C,colon'>验证人：</@label> </dt> 
                            <dd><input type="text" name="checkUser" value="${repairOrder.checkUser!''}" readonly="readonly" class="required"/></dd>
                        </dl>
                        <dl>
                        </dl>
                         <dl>
                            <dt><@label key='shutdownStartDatetime.C,colon'>停线开始时间：</@label></dt>
                            <dd><input type="text"  readonly="readonly" size="17" name="shutdownStartDatetime" value="${(repairOrder.shutdownStartDatetime?string('yyyy-MM-dd HH:mm'))?if_exists}" />
                            </dd>
                            </dl>
                        <dl>
                            <dt><@label key='shutdownEndDatetime.C,colon'>停线结束时间：</@label></dt>
                            <dd><input type="text" readonly="readonly" size="17" name="shutdownEndDatetime" value="${(repairOrder.shutdownEndDatetime?string('yyyy-MM-dd HH:mm'))?if_exists}" />
                            </dd>
                           </dl>
                        <dl  style="height: 70px; width: 590px;">
                            <dt><@label key='checkMemo.C,colon'>验收内容：</@label> </dt> 
                            <dd><textarea name="checkMemo"  style="height: 70px; width: 435px;"readonly="readonly" maxlength="200"  value="${repairOrder.checkMemo!''}" rows="2"><#if (repairOrder.checkMemo)??>${repairOrder.checkMemo!''}</#if></textarea>
                            </dd>
                        </dl>
                        <dl  style="height: 70px; width: 590px;">
                            <dt><@label key='checkResult.C,colon'>验收结果：</@label> </dt> 
                            <dd><textarea name="checkResult"  style="height: 70px; width: 435px;" readonly="readonly" maxlength="200"  value="${repairOrder.checkResult!''}" rows="2"><#if (repairOrder.checkResult)??>${repairOrder.checkResult!''}</#if></textarea>
                            </dd>
                        </dl>
                </div>
            </div>
            <div class="tabsFooter">
                <div class="tabsFooterContent"></div>
            </div>
        </div>
    </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                                <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>


